package com.kidback.bbloc259.network.utils;

import java.io.Closeable;
import java.io.IOException;

import io.reactivex.disposables.Disposable;

public class FreeUtil {

    public static void dispose(Disposable disposable) {
        if (disposable != null && !disposable.isDisposed()){
            disposable.dispose();
        }
    }

    public static void close(Closeable closeable){
        if (closeable != null){
            try {
                closeable.close();
            } catch (IOException e) {
            }
        }
    }

}
